package com.ssm.subject.infra.basic.mapper;

import com.ssm.subject.infra.basic.entity.SubjectMapping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 题目分类关系表(SubjectMapping)表数据库访问层
 *
 * @author makejava
 * @since 2024-11-27 20:47:34
 */
@Mapper
public interface SubjectMappingDao {

    /**
     * 新增数据
     *
     * @param subjectMapping 实例对象
     * @return 影响行数
     */
    int insert(SubjectMapping subjectMapping);

    /**
     * 修改数据
     *
     * @param subjectMapping 实例对象
     * @return 影响行数
     */
    int update(SubjectMapping subjectMapping);

    /**
     * 根据分类id查询
     * @param subjectMapping
     * @return
     */
    List<SubjectMapping> queryByLabelId(SubjectMapping subjectMapping);

    /**
     * 批量插入
     * @param subjectMappingList
     */
    void batchInsert(List<SubjectMapping> subjectMappingList);

}

